<?php
// +----------------------------------------------------------------------
// | ThinkCMF [ WE CAN DO IT MORE SIMPLE ]
// +----------------------------------------------------------------------
// | Copyright (c) 2013-2017 http://www.thinkcmf.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: 小夏 < 449134904@qq.com>
// +----------------------------------------------------------------------
namespace app\admin\validate;

use think\Validate;

class Role extends Validate
{
    protected $rule = [
        'role_name'       => 'require',
        'id'       => 'require',
    ];

    protected $message = [
        'role_name.require'       => '名称不能为空',
        'id.require'       => '没有发现ID',
    ];

    protected $scene = [
        'add'  => ['role_name'],
        'del'  => ['id'],
        'edit'  => ['id','role_name'],
    ];
}